package server;

public class BasicPassword {

	int currHash = 0;
	public static void main(String[] args) {
		BasicPassword test = new BasicPassword();
		System.out.println(test.passHash("HELLOWORLD"));
		System.out.println(test.passCheck("THISSHOUDLBREAK?"));
		System.out.println(test.passCheck("HELLOWORLD"));


	}
	
	private int passHash(String pass){
		currHash = pass.hashCode();
		return pass.hashCode();
	}
	
	private boolean passCheck(String pass){
		if(pass.hashCode() == currHash)
			return true;
		return false;
	}
	

	/*
	 *  using RegEx for email check using keyword
	 *  .match 
	 */
	
//	
//	
//	import java.util.regex.Matcher;
//	import java.util.regex.Pattern;
//	 
//	public class EmailValidator{
//	 
//		  private Pattern pattern;
//		  private Matcher matcher;
//	 
//		  private static final String EMAIL_PATTERN = 
//	                   "^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@
//	                   [A-Za-z0-9]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
//	 
//		  public boolean validate(String strToBeValidated){
//	 
//			  return strToBeValidated.matches(EMAIL_PATTERN);
//	 
//		  }
//	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
}
